/**
 * 
 */
package com.nextive.interview.dao.sqlite;

import android.content.Context;
import android.database.Cursor;
import android.os.DropBoxManager;

import com.nextive.interview.dao.WeightInfoDao;


/**
 * @author Martin
 *
 */
public class SqLiteWeightInfoDao extends SqLiteHelperDao implements WeightInfoDao {

    private static final String DATABASE_CREATE =
        "create table notes (_id integer primary key autoincrement, "
        + "title text not null, body text not null);";

    private static final String DATABASE_NAME = "data";
    private static final String DATABASE_TABLE = "user_info";
    private static final int DATABASE_VERSION = 2;
    private static final String DATABASE_DROP = "DROP TABLE IF EXISTS user_info";

	
	public SqLiteWeightInfoDao(Context context) {
		
		super(context);
		
	}
	
	@Override
	public Cursor fetchAllUserInfo() {

		open();
		return getDatabase().query(DATABASE_TABLE, new String[] {"weight"}, null, 
				null, null, null, null);
		
	}

	// todo - query data base to check this !
	@Override
	public boolean isUserFirstTime() {
		
		return false;
		
	}

	@Override
	public void deleteWeightInfo(long id) {
		
	}

	@Override
	protected String getDBName() {
		
		return DATABASE_NAME;
		
	}

	@Override
	protected int getDBVersion() {
		
		return DATABASE_VERSION;
		
	}

	@Override
	protected String getDBCreateStatement() {
		
		return DATABASE_CREATE;
		
	}

	@Override
	protected String getDBDropStatement() {
		
		return DATABASE_DROP;
		
	}
	
}
